package myTest;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import com.google.common.collect.Maps;
import org.junit.Test;

public class MapTest {

	@Test
	public void testMap(){
		
		ConcurrentHashMap<String, String> map = new ConcurrentHashMap<String, String>();
		//map.put(null, null);
		Map<String, String> map2 = new HashMap<String, String>();
		map2.put("ss","value");
		map2.put(null, null);

		System.out.println(map2.size());

		String key = "sss";
		System.out.println(spread(key.hashCode()));

		Map<String,String> map3 = Maps.newHashMap();
		map3.put(" /uus/token", "value");
		for (String key1 :map3.keySet()){
			System.out.println(key1);
		}

	}
	static final int HASH_BITS = 0x7fffffff; // usable bits of normal node hash
	static final int spread(int h) {
		return (h ^ (h >>> 16)) & HASH_BITS;
	}
}
